// const host= 'http://localhost:5000'


$(function(){
    axios.get(`${host}/blogs`).then((res)=>{
        console.log(res.data);
        
        res.data.data.forEach(item => {
            let html =`
                <tr class="blog${item.id}">
                    <td>${item.id}</td>
                    <td>${item.title}</td>
                    <td>${item.author}</td>
                    <td>
                        <input type="button" value="编辑" onclick="btn_Edit()">
                        <input type="button" value="删除" onclick="btn_Del()">
                    </td>
                </tr>
            `
            $('tbody').append(html)
        });
    })
})




